package cn.wolfcode.wolf2w.business.controller.admin;

import cn.wolfcode.wolf2w.business.SearchApp;
import cn.wolfcode.wolf2w.business.service.IDestinationEsService;
import cn.wolfcode.wolf2w.business.service.INoteEsService;
import cn.wolfcode.wolf2w.business.service.IStrategyEsService;
import cn.wolfcode.wolf2w.business.service.IUserInfoEsService;
import cn.wolfcode.wolf2w.business.service.impl.UserInfoEsServiceImpl;
import cn.wolfcode.wolf2w.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchAdminController {

    @Autowired
    private IStrategyEsService strategyEsService;

    @Autowired
    private IUserInfoEsService userInfoEsService;

    @Autowired
    private INoteEsService noteEsService;

    @Autowired
    private IDestinationEsService destinationEsService;




    @GetMapping("/dataInit")
    public R<?> dataInit(){
        //同步的过程,初始化
//        strategyEsService.initStrategyEs();
//        userInfoEsService.initUserInfoEs();

        noteEsService.initNoteEs();

        destinationEsService.initDestinationEs();

        return R.ok("es同步数据成功");
    }

}
